﻿public static class GlobalMembersGamewnd_setkeyboard
{

//* 初始化键位设置窗口 
	// ****************************************************************************
	// * Punch And Kick -- a simple 2D Fighting Game.
	// *
	// * Copyright (C) 2013 by
	// * Liu Chao
	// *
	// * This file is part of the Punch And Kick project, and may only be used,
	// * modified, and distributed under the terms of the GPLv2.
	// *
	// * (GPLv2 is abbreviation of GNU General Public License Version 2)
	// *
	// * By continuing to use, modify, or distribute this file you indicate that you
	// * have read the license and understand and accept it fully.
	// *
	// * The Punch And Kick project is distributed in the hope that it will be
	// * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 
	// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GPL v2 for
	// * more details.
	// *
	// * You should have received a copy of the GPLv2 along with this file. It is
	// * usually in the LICENSE.TXT file, If not, see <http://www.gnu.org/licenses/>.
	// * **************************************************************************

	// ****************************************************************************
	// * Punch And Kick -- 一个普通的2D格斗游戏
	// *
	// * 版权所有 (C) 2013 归属于
	// * 刘超
	// *
	// * 这个文件是 Punch And Kick 项目的一部分，并且只可以根据GPLv2许可协议来使用、
	// * 更改和发布。
	// *
	// * (GPLv2 是 GNU通用公共许可证第二版 的英文缩写)
	// *
	// * 继续使用、修改或发布本文件，表明您已经阅读并完全理解和接受这个许可协议。
	// *
	// * Punch And Kick 项目是基于技术交流目的而加以散布的，但不负任何担保责任，例
	// * 如：稳定性、可玩性、趣味性等的担保，甚至没有适销性或特定用途的隐含担保，详
	// * 情请参照GPLv2许可协议。
	// *
	// * 您应已收到附随于本文件的GPLv2许可协议的副本，它通常在LICENSE.TXT文件中，如果
	// * 没有，请查看：<http://www.gnu.org/licenses/>.
	// * **************************************************************************

	// 游戏窗口-键位设置


	// ****************************************************************************
	// * Punch And Kick -- a simple 2D Fighting Game.
	// *
	// * Copyright (C) 2013 by
	// * Liu Chao
	// *
	// * This file is part of the Punch And Kick project, and may only be used,
	// * modified, and distributed under the terms of the GPLv2.
	// *
	// * (GPLv2 is abbreviation of GNU General Public License Version 2)
	// *
	// * By continuing to use, modify, or distribute this file you indicate that you
	// * have read the license and understand and accept it fully.
	// *
	// * The Punch And Kick project is distributed in the hope that it will be
	// * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 
	// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GPL v2 for
	// * more details.
	// *
	// * You should have received a copy of the GPLv2 along with this file. It is
	// * usually in the LICENSE.TXT file, If not, see <http://www.gnu.org/licenses/>.
	// * **************************************************************************

	// ****************************************************************************
	// * Punch And Kick -- 一个普通的2D格斗游戏
	// *
	// * 版权所有 (C) 2013 归属于
	// * 刘超
	// *
	// * 这个文件是 Punch And Kick 项目的一部分，并且只可以根据GPLv2许可协议来使用、
	// * 更改和发布。
	// *
	// * (GPLv2 是 GNU通用公共许可证第二版 的英文缩写)
	// *
	// * 继续使用、修改或发布本文件，表明您已经阅读并完全理解和接受这个许可协议。
	// *
	// * Punch And Kick 项目是基于技术交流目的而加以散布的，但不负任何担保责任，例
	// * 如：稳定性、可玩性、趣味性等的担保，甚至没有适销性或特定用途的隐含担保，详
	// * 情请参照GPLv2许可协议。
	// *
	// * 您应已收到附随于本文件的GPLv2许可协议的副本，它通常在LICENSE.TXT文件中，如果
	// * 没有，请查看：<http://www.gnu.org/licenses/>.
	// * **************************************************************************

	

//	public static void GameWindow_InitSetKeyboardWindow()
//	{
//		// 创建所需的GUI部件
//		window = Widget_New("window");
//		box = Widget_New(null);
//		label = Widget_New("label");
//		label_left = Widget_New("label");
//		label_right = Widget_New("label");
//		label_up = Widget_New("label");
//		label_down = Widget_New("label");
//		label_jump = Widget_New("label");
//		label_defense = Widget_New("label");
//		label_a_atk = Widget_New("label");
//		label_b_atk = Widget_New("label");
//		btn_left = Widget_New("button");
//		btn_right = Widget_New("button");
//		btn_up = Widget_New("button");
//		btn_down = Widget_New("button");
//		btn_a_atk = Widget_New("button");
//		btn_b_atk = Widget_New("button");
//		btn_jump = Widget_New("button");
//		btn_defense = Widget_New("button");
//		btn_ok = Widget_New("button");
//		btn_reset = Widget_New("button");

//		Widget_Container_Add(box, btn_left);
//		Widget_Container_Add(box, btn_right);
//		Widget_Container_Add(box, btn_up);
//		Widget_Container_Add(box, btn_down);
//		Widget_Container_Add(box, btn_jump);
//		Widget_Container_Add(box, btn_defense);
//		Widget_Container_Add(box, btn_a_atk);
//		Widget_Container_Add(box, btn_b_atk);
//		Widget_Container_Add(box, label_left);
//		Widget_Container_Add(box, label_right);
//		Widget_Container_Add(box, label_up);
//		Widget_Container_Add(box, label_down);
//		Widget_Container_Add(box, label_jump);
//		Widget_Container_Add(box, label_defense);
//		Widget_Container_Add(box, label_a_atk);
//		Widget_Container_Add(box, label_b_atk);
//		Window_ClientArea_Add(window, box);
//		Window_ClientArea_Add(window, label);
//		Window_ClientArea_Add(window, btn_ok);
//		Window_ClientArea_Add(window, btn_reset);

//		Widget_SetAutoSize(btn_left, DefineConstantsGamewnd_setkeyboard.FALSE, 0);
//		Widget_SetAutoSize(btn_right, DefineConstantsGamewnd_setkeyboard.FALSE, 0);
//		Widget_SetAutoSize(btn_up, DefineConstantsGamewnd_setkeyboard.FALSE, 0);
//		Widget_SetAutoSize(btn_down, DefineConstantsGamewnd_setkeyboard.FALSE, 0);
//		Widget_SetAutoSize(btn_jump, DefineConstantsGamewnd_setkeyboard.FALSE, 0);
//		Widget_SetAutoSize(btn_a_atk, DefineConstantsGamewnd_setkeyboard.FALSE, 0);
//		Widget_SetAutoSize(btn_b_atk, DefineConstantsGamewnd_setkeyboard.FALSE, 0);
//		Widget_SetAutoSize(btn_defense, DefineConstantsGamewnd_setkeyboard.FALSE, 0);
//		Widget_SetAutoSize(btn_ok, DefineConstantsGamewnd_setkeyboard.FALSE, 0);

//		Widget_Resize(btn_left, Size(50,50));
//		Widget_Resize(btn_right, Size(50,50));
//		Widget_Resize(btn_up, Size(50,50));
//		Widget_Resize(btn_down, Size(50,50));
//		Widget_Resize(btn_jump, Size(50,50));
//		Widget_Resize(btn_a_atk, Size(50,50));
//		Widget_Resize(btn_b_atk, Size(50,50));
//		Widget_Resize(btn_defense, Size(50,50));
//		Widget_Resize(btn_ok, Size(80,30));
//		Widget_Resize(btn_reset, Size(80,30));

//		Widget_Move(btn_left, Pos(0,50+22));
//		Widget_Move(btn_right, Pos(100,50+22));
//		Widget_Move(btn_up, Pos(50,0+22));
//		Widget_Move(btn_down, Pos(50,50+22));
//		Widget_Move(btn_jump, Pos(200,50+22));
//		Widget_Move(btn_a_atk, Pos(200,0+22));
//		Widget_Move(btn_b_atk, Pos(250,0+22));
//		Widget_Move(btn_defense, Pos(250,50+22));

//		Widget_Move(label_left, Pos(10,125));
//		Widget_Move(label_right, Pos(110,125));
//		Widget_Move(label_up, Pos(60,0));
//		Widget_Move(label_down, Pos(60,125));
//		Widget_Move(label_a_atk, Pos(210,0));
//		Widget_Move(label_b_atk, Pos(260,0));
//		Widget_Move(label_jump, Pos(210,125));
//		Widget_Move(label_defense, Pos(260,125));

//		UpdateKeyBtn();
//		// 设置各种文本
//		Label_TextW(label_left, "<size=15px>左</size>");
//		Label_TextW(label_right, "<size=15px>右</size>");
//		Label_TextW(label_up, "<size=15px>上</size>");
//		Label_TextW(label_down, "<size=15px>下</size>");
//		Label_TextW(label_jump, "<size=15px>跳跃</size>");
//		Label_TextW(label_defense, "<size=15px>防御</size>");
//		Label_TextW(label_a_atk, "<size=15px>拳击</size>");
//		Label_TextW(label_b_atk, "<size=15px>脚踢</size>");
//		// 设置窗口
//		Widget_SetStyleID(window, WINDOW_STYLE.WINDOW_STYLE_LINE);
//		Widget_Resize(window, Size(345,245));
//		Widget_SetPadding(Window_GetClientArea(window), Padding(10,10,10,10));

//		Label_TextW(label, " <size=15px>键位设置</size> ");
//		Widget_SetBackgroundColor(label, RGB(255,255,255));
//		Widget_SetBackgroundTransparent(label, DefineConstantsGamewnd_setkeyboard.FALSE);

//		Button_TextW(btn_ok, "确定");
//		Button_TextW(btn_reset, "恢复默认");

//		Widget_SetSize(box, "100%", "165px");
//		Widget_SetBorder(box, Border(1,BORDER_STYLE_SOLID,RGB(200,200,200)));
//		Widget_SetPadding(box, Padding(10,10,10,10));

//		Widget_SetAlign(box, ALIGN_TYPE_.ALIGN_TOP_CENTER, Pos(0,12));
//		Widget_SetAlign(label, ALIGN_TYPE_.ALIGN_TOP_CENTER, Pos(0,0));
//		Widget_SetAlign(btn_ok, ALIGN_TYPE_.ALIGN_BOTTOM_CENTER, Pos(-50,-5));
//		Widget_SetAlign(btn_reset, ALIGN_TYPE_.ALIGN_BOTTOM_CENTER, Pos(50,-5));
//		// 为键位按钮连接事件
//		Widget_ConnectEvent(btn_ok, EVENT_CLICKED, btn_ok_on_clicked);
//		Widget_ConnectEvent(btn_reset, EVENT_CLICKED, btn_reset_on_clicked);
//		Widget_ConnectEvent(btn_left, EVENT_CLICKED, btn_key_on_clicked);
//		Widget_ConnectEvent(btn_right, EVENT_CLICKED, btn_key_on_clicked);
//		Widget_ConnectEvent(btn_up, EVENT_CLICKED, btn_key_on_clicked);
//		Widget_ConnectEvent(btn_down, EVENT_CLICKED, btn_key_on_clicked);
//		Widget_ConnectEvent(btn_b_atk, EVENT_CLICKED, btn_key_on_clicked);
//		Widget_ConnectEvent(btn_a_atk, EVENT_CLICKED, btn_key_on_clicked);
//		Widget_ConnectEvent(btn_jump, EVENT_CLICKED, btn_key_on_clicked);
//		Widget_ConnectEvent(btn_defense, EVENT_CLICKED, btn_key_on_clicked);

//		Widget_Show(btn_left);
//		Widget_Show(btn_right);
//		Widget_Show(btn_up);
//		Widget_Show(btn_down);
//		Widget_Show(btn_jump);
//		Widget_Show(btn_a_atk);
//		Widget_Show(btn_b_atk);
//		Widget_Show(btn_defense);
//		Widget_Show(label_left);
//		Widget_Show(label_right);
//		Widget_Show(label_up);
//		Widget_Show(label_down);
//		Widget_Show(label_jump);
//		Widget_Show(label_a_atk);
//		Widget_Show(label_b_atk);
//		Widget_Show(label_defense);
//		Widget_Show(btn_ok);
//		Widget_Show(btn_reset);
//		Widget_Show(box);
//		Widget_Show(label);
//	}

////* 显示键位设置窗口 

//	public static void GameWindow_ShowSetKeyboardWindow()
//	{
//		Widget_SetModal(window, DefineConstantsGamewnd_setkeyboard.TRUE);
//		Widget_Show(window);
//	}

////* 隐藏键位设置窗口 

//	public static void GameWindow_HideSetKeyboardWindow()
//	{
//		Widget_Hide(window);
//	}

////* 销毁键位设置窗口 

//	public static void GameWindow_DestroySetKeyboardWindow()
//	{
//		Widget_Destroy(window);
//	}
//	//#endif


//	//C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
//	//ORIGINAL LINE: #define WINDOW_SIZE Size(345,245)
//	#define WINDOW_SIZE
//	//C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
//	//ORIGINAL LINE: #define BTN_SIZE Size(80,30)
//	#define BTN_SIZE
//	//C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
//	//ORIGINAL LINE: #define KEYBTN_SIZE Size(50,50)
//	#define KEYBTN_SIZE
//	//C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
//	//ORIGINAL LINE: #define TIPBOX_SIZE Size(240,120)
//	#define TIPBOX_SIZE

//	//C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
//	//ORIGINAL LINE: #define TEXT_OK L"确定"
//	#define TEXT_OK
//	//C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
//	//ORIGINAL LINE: #define TEXT_RESET L"恢复默认"
//	#define TEXT_RESET
//	#define TEXT_SET_KEYBOARD_AlternateDefinition1
//	//C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
//	//ORIGINAL LINE: #define TEXT_SET_KEYBOARD L" <size=15px>键位设置</size> "
//	#define TEXT_SET_KEYBOARD
//	//C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
//	//ORIGINAL LINE: #define TEXT_LEFT L"<size=15px>左</size>"
//	#define TEXT_LEFT
//	//C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
//	//ORIGINAL LINE: #define TEXT_RIGHT L"<size=15px>右</size>"
//	#define TEXT_RIGHT
//	//C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
//	//ORIGINAL LINE: #define TEXT_UP L"<size=15px>上</size>"
//	#define TEXT_UP
//	//C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
//	//ORIGINAL LINE: #define TEXT_DOWN L"<size=15px>下</size>"
//	#define TEXT_DOWN
//	//C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
//	//ORIGINAL LINE: #define TEXT_JUMP L"<size=15px>跳跃</size>"
//	#define TEXT_JUMP
//	//C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
//	//ORIGINAL LINE: #define TEXT_DEFENSE L"<size=15px>防御</size>"
//	#define TEXT_DEFENSE
//	//C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
//	//ORIGINAL LINE: #define TEXT_A_ATK L"<size=15px>拳击</size>"
//	#define TEXT_A_ATK
//	//C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
//	//ORIGINAL LINE: #define TEXT_B_ATK L"<size=15px>脚踢</size>"
//	#define TEXT_B_ATK
//	//C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
//	//ORIGINAL LINE: #define TEXT_PLEASE_PRESS_KEY L"<size=18px>请按下要使用的键</size>"
//	#define TEXT_PLEASE_PRESS_KEY
//	//C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
//	//ORIGINAL LINE: #define TEXT_KEY_IS_NOT_VALID L"<size=18px>该键不可用，请按下另外的键</size>"
//	#define TEXT_KEY_IS_NOT_VALID


//	public static LCUI_Widget_ btn_left;
//	public static LCUI_Widget_ btn_right;
//	public static LCUI_Widget_ btn_up;
//	public static LCUI_Widget_ btn_down;
//	public static LCUI_Widget_ btn_a_atk;
//	public static LCUI_Widget_ btn_b_atk;
//	public static LCUI_Widget_ btn_defense;
//	public static LCUI_Widget_ btn_jump;
//	public static LCUI_Widget_ label_left;
//	public static LCUI_Widget_ label_right;
//	public static LCUI_Widget_ label_up;
//	public static LCUI_Widget_ label_down;
//	public static LCUI_Widget_ label_a_atk;
//	public static LCUI_Widget_ label_b_atk;
//	public static LCUI_Widget_ label_defense;
//	public static LCUI_Widget_ label_jump;

//	internal static int keyboard_connect_id = -1;

//	internal static LCUI_BOOL KeyIsValid(int key_code)
//	{
//		switch(key_code)
//		{
//		case VK_UP:
//		case VK_DOWN:
//		case VK_LEFT:
//		case VK_RIGHT:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_SPACE:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_0:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_1:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_2:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_3:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_4:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_5:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_6:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_7:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_8:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_9:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_A:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_B:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_C:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_D:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_E:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_F:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_G:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_H:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_I:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_J:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_K:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_L:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_M:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_N:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_O:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_P:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_Q:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_R:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_S:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_T:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_U:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_V:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_W:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_X:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_Y:
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_Z:
//		break;
//		default:
//			return DefineConstantsGamewnd_setkeyboard.FALSE;
//		}
//		return DefineConstantsGamewnd_setkeyboard.TRUE;
//	}


//	internal static LCUI_BOOL GetKeyText(int key_code, char[] text)
//	{
//		switch(key_code)
//		{
//		case VK_UP:
//			text[0] = '↑';
//			text[1] = 0;
//			break;
//		case VK_DOWN:
//			text[0] = '↓';
//			text[1] = 0;
//			break;
//		case VK_LEFT:
//			text[0] = '←';
//			text[1] = 0;
//			break;
//		case VK_RIGHT:
//			text[0] = '→';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_SPACE:
//			text[0] = '空';
//			text[1] = '格';
//			text[2] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_0:
//			text[0] = '0';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_1:
//			text[0] = '1';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_2:
//			text[0] = '2';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_3:
//			text[0] = '3';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_4:
//			text[0] = '4';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_5:
//			text[0] = '5';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_6:
//			text[0] = '6';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_7:
//			text[0] = '7';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_8:
//			text[0] = '8';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_9:
//			text[0] = '9';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_A:
//			text[0] = 'A';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_B:
//			text[0] = 'B';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_C:
//			text[0] = 'C';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_D:
//			text[0] = 'D';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_E:
//			text[0] = 'E';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_F:
//			text[0] = 'F';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_G:
//			text[0] = 'G';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_H:
//			text[0] = 'H';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_I:
//			text[0] = 'I';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_J:
//			text[0] = 'J';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_K:
//			text[0] = 'K';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_L:
//			text[0] = 'L';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_M:
//			text[0] = 'M';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_N:
//			text[0] = 'N';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_O:
//			text[0] = 'O';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_P:
//			text[0] = 'P';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_Q:
//			text[0] = 'Q';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_R:
//			text[0] = 'R';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_S:
//			text[0] = 'S';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_T:
//			text[0] = 'T';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_U:
//			text[0] = 'U';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_V:
//			text[0] = 'V';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_W:
//			text[0] = 'W';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_X:
//			text[0] = 'X';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_Y:
//			text[0] = 'Y';
//			text[1] = 0;
//			break;
//		case DefineConstantsGamewnd_setkeyboard.LCUIKEY_Z:
//			text[0] = 'Z';
//			text[1] = 0;
//			break;
//		break;
//		default:
//			return DefineConstantsGamewnd_setkeyboard.FALSE;
//		}
//		return DefineConstantsGamewnd_setkeyboard.TRUE;
//	}

//	//* 更新按钮上显示的按键文字 
//	internal static void UpdateKeyBtn()
//	{
//		ControlKey_ ctrlkey = new ControlKey_();
//		char[] btn_text = new char[24];
//		char[] buff_text = new char[12];

//		GameConfig_GetKeyControl(ctrlkey);

//		GetKeyText(ctrlkey.left, buff_text);
//		swprintf(btn_text, typeof(btn_text), "<size=18px>%s</size>", buff_text);
//		Button_TextW(btn_left, btn_text);

//		GetKeyText(ctrlkey.right, buff_text);
//		swprintf(btn_text, typeof(btn_text), "<size=18px>%s</size>", buff_text);
//		Button_TextW(btn_right, btn_text);

//		GetKeyText(ctrlkey.up, buff_text);
//		swprintf(btn_text, typeof(btn_text), "<size=18px>%s</size>", buff_text);
//		Button_TextW(btn_up, btn_text);

//		GetKeyText(ctrlkey.down, buff_text);
//		swprintf(btn_text, typeof(btn_text), "<size=18px>%s</size>", buff_text);
//		Button_TextW(btn_down, btn_text);

//		GetKeyText(ctrlkey.a_attack, buff_text);
//		swprintf(btn_text, typeof(btn_text), "<size=18px>%s</size>", buff_text);
//		Button_TextW(btn_a_atk, btn_text);

//		GetKeyText(ctrlkey.b_attack, buff_text);
//		swprintf(btn_text, typeof(btn_text), "<size=18px>%s</size>", buff_text);
//		Button_TextW(btn_b_atk, btn_text);

//		GetKeyText(ctrlkey.defense, buff_text);
//		swprintf(btn_text, typeof(btn_text), "<size=18px>%s</size>", buff_text);
//		Button_TextW(btn_defense, btn_text);

//		GetKeyText(ctrlkey.jump, buff_text);
//		swprintf(btn_text, typeof(btn_text), "<size=18px>%s</size>", buff_text);
//		Button_TextW(btn_jump, btn_text);
//	}

//	//* 响应LCUI_KEYDOWN事件 
//	private static void ProcKeyDown(LCUI_Event *event, IntPtr arg)
//	{
//		ControlKey_ ctrlkey = new ControlKey_();
//		LCUI_Widget_ target_btn;
//		//* 如果按键不可用 
//		if (KeyIsValid(event.key.key_code) == null)
//		{
//			// 更改提示框显示的文本框 
//			Label_TextW(tip_label, "<size=18px>该键不可用，请按下另外的键</size>");
//			return;
//		}
//		// 获取当前的键位配置数据 
//		GameConfig_GetKeyControl(ctrlkey);
//		// 获取被点击的按钮 
//		target_btn = (LCUI_Widget_)arg;
//		// 判断被点击的按钮是哪个，并保存相应键位设置 
//		if(target_btn == btn_left)
//		{
//			ctrlkey.left = event.key.key_code;
//		}
//		else if(target_btn == btn_right)
//		{
//			ctrlkey.right = event.key.key_code;
//		}
//		else if(target_btn == btn_up)
//		{
//			ctrlkey.up = event.key.key_code;
//		}
//		else if(target_btn == btn_down)
//		{
//			ctrlkey.down = event.key.key_code;
//		}
//		else if(target_btn == btn_a_atk)
//		{
//			ctrlkey.a_attack = event.key.key_code;
//		}
//		else if(target_btn == btn_b_atk)
//		{
//			ctrlkey.b_attack = event.key.key_code;
//		}
//		else if(target_btn == btn_jump)
//		{
//			ctrlkey.jump = event.key.key_code;
//		}
//		else if(target_btn == btn_defense)
//		{
//			ctrlkey.defense = event.key.key_code;
//		}
//		// 更新键位配置数据 
//		GameConfig_SetKeyControl(ctrlkey);
//		GameConfig_Save();
//		UpdateKeyBtn();
//		// 销毁提示框 
//		Widget_Destroy(tip_box);
//		// 解除LCUI_KEYDOWN事件连接 
//		LCUISysEvent_Disconnect(AnonymousEnum.LCUI_KEYDOWN, keyboard_connect_id);
//		// 重置这两个变量 
//		tip_box = null;
//		keyboard_connect_id = -1;
//	}

//	//* 捕捉键盘按键输入 
//	internal static void StartCatchKey(LCUI_Widget_ btn)
//	{
//		if (tip_box != null)
//		{
//			return;
//		}
//		// 创建提示框 
//		tip_box = Widget_New(null);
//		tip_label = Widget_New("label");
//		// 将label部件添加至提示框中 
//		Widget_Container_Add(tip_box, tip_label);
//		// 设置提示框中显示的文本 
//		Label_TextW(tip_label, "<size=18px>请按下要使用的键</size>");
//		// 设置提示框位置、尺寸及样式 
//		Widget_SetAlign(tip_label, ALIGN_TYPE_.ALIGN_MIDDLE_CENTER, Pos(0,0));
//		Widget_SetAlign(tip_box, ALIGN_TYPE_.ALIGN_MIDDLE_CENTER, Pos(0,0));
//		Widget_Resize(tip_box, Size(240,120));
//		Widget_SetBackgroundTransparent(tip_box, DefineConstantsGamewnd_setkeyboard.FALSE);
//		Widget_SetBorder(tip_box, Border(1,BORDER_STYLE_SOLID,RGB(200,200,200)));
//		// 连接LCUI_KEYDOWN事件，以在键盘按键被按下时进行响应 
//		keyboard_connect_id = LCUISysEvent_Connect(AnonymousEnum.LCUI_KEYDOWN, ProcKeyDown, btn);

//		Widget_Show(tip_label);
//		Widget_SetModal(tip_box, DefineConstantsGamewnd_setkeyboard.TRUE);
//		Widget_Show(tip_box);
//	}

//	//* 在“确定”按钮被点击时 
//	private static void btn_ok_on_clicked( LCUI_Widget_ *widget, LCUI_WidgetEvent *event)
//	{
//		GameWindow_HideSetKeyboardWindow();
//		GameWindow_DestroySetKeyboardWindow();
//	}

//	//* 在“恢复默认”按钮被点击时 
//	private static void btn_reset_on_clicked( LCUI_Widget_ *widget, LCUI_WidgetEvent *event)
//	{
//		GameConfig_InitKeyControl();
//		GameConfig_Save();
//		UpdateKeyBtn();
//	}

//	//* 在键位按钮被点击时 
//	private static void btn_key_on_clicked( LCUI_Widget_ *widget, LCUI_WidgetEvent *event)
//	{
//		StartCatchKey(widget);
//	}
}
